<template>
  <div>
    <!-- 二级路由出口 -->
    <router-view></router-view>
    <!-- tabBar组件 -->
    <!-- route 表示开启路由模式 -->
    <van-tabbar class="tab-bar" v-model="active" route>
      <van-tabbar-item to="/home" icon-prefix="toutiao" icon="shouye">首页</van-tabbar-item>
      <van-tabbar-item to="/qa" icon-prefix="toutiao" icon="wenda">问答</van-tabbar-item>
      <van-tabbar-item to="/video" icon-prefix="toutiao" icon="shipin">视频</van-tabbar-item>
      <van-tabbar-item to="/user" icon-prefix="toutiao" icon="wode">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  name: 'Layout',
  data () {
    return {
      active: 0
    }
  }
}
</script>

<style scoped lang="less">
/deep/ .tab-bar .toutiao{
  font-size: 36px;
}
</style>
